package zuo;

public class Triangle extends Shape {

    @Override
    public void perimeter() {//面积
        this.setZ(10);
        this.setR(15);
        this.setK(14);
        double c=this.getZ()+this.getR()+this.getK();
        System.out.println("三角形的周长："+c);
    }
    public void area(){
        this.setR(10);
        this.setK(5);
        double b=this.getR()*this.getK();
        System.out.println("三角形的面积："+b);
    };

    @Override
    public void SetColor() {//周长
        this.setColor("黑色");
        System.out.println("颜色："+this.getColor());

    }

}
